# Determine host platform
set(BT_LIB_PREFIX "lib")
set(BT_LIB_SUFFIX ".so")
# set(BT_DLL_SUFFIX ".so")

set(BehaviorTree_ROOT_DIR "/usr/local")

# OrbbecSDK library
set(BehaviorTree_INCLUDE_DIRS ${BehaviorTree_ROOT_DIR}/include/)
set(BehaviorTree_LIBS_DIR ${BehaviorTree_ROOT_DIR}/lib/)
set(BehaviorTree_LIBRARY  ${BehaviorTree_LIBS_DIR}/${BT_LIB_PREFIX}behaviortree_cpp${BT_LIB_SUFFIX})
# set(BehaviorTree_DLL ${BehaviorTree_LIBS_DIR}/${BT_LIB_PREFIX}behaviortree_cpp${BT_DLL_SUFFIX})

add_library(BehaviorTree::BehaviorTree SHARED IMPORTED)
set_target_properties(BehaviorTree::BehaviorTree PROPERTIES
    IMPORTED_LOCATION ${BehaviorTree_LIBRARY}
    # IMPORTED_IMPLIB ${BehaviorTree_DLL}
    INTERFACE_INCLUDE_DIRECTORIES ${BehaviorTree_INCLUDE_DIRS}
)

set(BehaviorTree_LIBS ${BehaviorTree_LIBRARY})
# file(GLOB BehaviorTree_DLL_FILES ${BehaviorTree_LIBS_DIR}/*${BT_DLL_SUFFIX}*)

set(BehaviorTree_FOUND TRUE)